package com.neulogistics.core.customercenter.api.application.integrationevent.publish;

import com.blackto.lib.eventbus.event.IntegrationEvent;
import com.neulogistics.core.customercenter.domain.model.valueobject.Address;
import com.neulogistics.core.customercenter.domain.model.valueobject.OrderItem;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;

@Setter
public class OrderPlacedIntegrationEvent extends IntegrationEvent {
    /**
     * 订单id
     */
    public Long orderId;

    /**
     * 客户id
     */
    public Integer customerId;

    /**
     * 订单项，用来储存订单中的商品信息，包含商品id、数量、单价、计量单位
     */
    public List<OrderItem> orderItems;

    /**
     * 总额
     */
    public Integer totalAmount;

    /**
     * 备注信息
     */
    public String orderRemark;

    /**
     * 收货地址{省，市，区，详细}
     */
    public Address receiverAddress;

    /**
     * 收货人名
     */
    public String receiverName;

    /**
     * 收货人电话
     */
    public String receiverPhone;

    /**
     * 是否需要发票：0:不需要；1:需要
     */
    public Integer optInvoice;

    /**
     * 期望配送时间
     */
    public Date expDeliveryTime;

    // TODO 待完善
    public OrderPlacedIntegrationEvent(Long eventId) {
        super(eventId);
    }
}
